<template>
  <div>
      <el-dialog title="查看审批历史" :visible.sync="dialogTableVisible" @close="close" width="1200px">
        <el-table :data="list" border>
            <el-table-column align="center" type="index" label="序号" width="55"/>
            <el-table-column align="center" property="itemTitle" label="任务名称"></el-table-column>
            <el-table-column align="center" property="todoUserName" label="处理人"></el-table-column>
            <el-table-column align="center" property="itemContent" label="备注"></el-table-column>
            <el-table-column align="center" property="applyUserName" label="申请人"></el-table-column>
            <el-table-column align="center" property="applyTime" label="申请时间" width="170"></el-table-column>
<!--   <el-table-column align="center" property="taskName" label="状态"></el-table-column>-->

            <el-table-column align="center" property="handleTime" label="审批完成时间" width="170"></el-table-column>
          <el-table-column label="审批意见" align="center" width="180">
            <template slot-scope="scope">
              <span v-show="scope.row.todoConsent==1">同意</span>
              <span v-show="scope.row.todoConsent==2">驳回</span>
            </template>
          </el-table-column>

            <el-table-column align="center" property="todoDescribe" label="申请结果描述" width="150"></el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer">
            <el-button @click="close">取 消</el-button>
            <el-button type="primary" @click="close">确 定</el-button>
        </div>
    </el-dialog>


  </div>
</template>

<script>
import {approveList} from '@/api/purchase/approve'

export default {
    props:['info'],
    data(){
        return{
            dialogTableVisible:true,
            list:[],
            total:0
        }
    },
    created(){
        this.getList()
    },
    methods:{
        getList(){
            approveList(this.info.moduleId).then((res)=>{
                if(res.code==200){
                    this.list=res.rows
                    this.total=res.total
                }
            })
        },
        close(){
            this.$emit('change')
        },
        init(){
            request({
                // url: '/device/implementer',
                // method: 'get',
                // params,
            })
        }
    }
}
</script>

<style>

</style>
